home *** CD-ROM | disk | FTP | other *** search
/ Coders Scene 4 / Coders Scene Magazine - Issue 4 (1990-10-01)(Culprits)_004.png < prev    next >
Portable Network Graphic  |  1990-01-01  |  26KB  |  752x576  |  4-bit (10 colors)
Labels: text | screenshot | font
OCR: Super-Change Your 68000 Code. 1/12 | Page:03 Super-Charging 68000 code by Laurence Vanhelsuwe (C) Jan 1990 Let's assume you're past the stage where your code runs slowly because of inefficient algorithms, but your code still doesn't burn tyres ... What do you do ? Well, frankly, you shouldn't use the following tips but redesign your algorithms AGAIN and spend some more time designing them! O.K. so you think the algorithm is the sexiest around or you hit a dead end in that area; then it's time to look at your code in small sections at Most C compilers do it (according to the dealers), it's called peephole a time . optimization. Basically it consists of taking small sections of code (say half a dozen instructions max) and modifying them into identical functional sequences but with this pare and valuable attribute added: efficiency. In the remainder of the article I'll assume that you have programmed the 68000 before, in other words you know most available instructions and addressing modes. When hunting down cycle-guzzling sections of your program, there are a couple of rules that you should always keep in mind: 1) Loops are the killers. When reading your source file, loops easily blend in with the crowd. (Cont'd)